19 LOCATE 23,1:PRINT "Which Game do You wish to Play (Enter the number of the Game)";:INPUT gg
20 IF gg=1 THEN g$="Cities"
22 IF gg=2 THEN g$="States"
23 IF gg=3 THEN g$="Countries"
24 IF gg=4 THEN g$="KidsWorld"
25 IF gg=5 THEN g$="It starts with Green"
26 IF gg=6 THEN g$="Too"
27 IF gg=7 THEN g$="Affection"
28 IF gg=8 THEN g$="Odor"
29 IF gg=9 THEN g$="Boating"
30 IF gg=10 THEN g$="Automobiles"
31 IF gg=11 THEN g$="Fishing"
32 IF gg=12 THEN g$="Trees"
33 IF gg=13 THEN g$="Hunting"
34 IF gg=14 THEN g$="School"
35 IF gg=15 THEN g$="Cleanness"
36 IF gg=16 THEN g$="Winter"
37 IF gg=17 THEN g$="War"
38 IF gg=18 THEN g$="Hospitals"
39 IF gg=19 THEN g$="Body Parts"
40 IF gg=20 THEN g$="Tools"
41 IF gg=21 THEN g$="Health"
42 IF gg=22 THEN g$="Pollution"
43 IF gg=23 THEN g$="Lake"
44 IF gg=24 THEN g$="Class"
45 IF gg=25 THEN g$="Computers"
46 IF gg=26 THEN g$="Junk Food"
47 IF gg=27 THEN g$="Trucks"
48 IF gg=28 THEN g$="Actors"
49 IF gg=29 THEN g$="Metals"
50 IF gg=30 THEN g$="On a Table"
IF gg>=1 AND gg<=30 THEN 91 ELSE GOTO 5
91 CLS:DIM c$(11,11):DIM d1$(20) 'd1$( ) is city titles array
DIM f(20):DIM g(20):DIM rt$(550):DIM ji(120):DIM fi(15):DIM gi(15) 'f & g are for word finish
pv=1:CLS:COLOR 2
a=2:h=12:i=12:t1=0:redo=19
IF n6=3 THEN n8=520:COLOR 1:LOCATE 12,31:PRINT "Thinking":COLOR 2:GOSUB Challenge:GOTO 96
COLOR 1:LOCATE 12,31:PRINT "Thinking"
OPEN g$ FOR INPUT AS #1
FOR hu=1 TO 142:INPUT #1,rt$(hu):NEXT hu:CLOSE #1
gg$=rt$(1):zz$=rt$(2):lim=3:CLS:COLOR 4
LINE (0,4)-(420,18),4,bf:LINE (0,36)-(420,50),4,bf:LINE (0,69)-(420,83),4,bf
LINE (0,101)-(420,115),4,bf:LINE (0,132)-(420,146),4,bf:LINE (0,164)-(420,177),4,bf
COLOR 2
FOR d=1 TO 11:c=2
IF d=1 OR d=3 OR d=5 OR d=7 OR d=9 OR d=11 THEN COLOR 2,4
FOR b=1 TO 11:c$(d,b)=rt$(lim)
LOCATE a,c:PRINT c$(d,b)
c=c+5:h=h+40:lim=lim+1
NEXT b:a=a+2:i=i+16:h=12
NEXT d:Li=2:LL=15:lim=124:COLOR 2,0:CIRCLE (500,11),6:PAINT (500,11),3,2
GET (493,7)-(507,15),ji
FOR v=1 TO 19:d$=rt$(lim):d1$(v+1)=d$ 'loop for making cities on screen
IF n6=1 THEN LOCATE Li,65:PRINT d$ 'prints whole word on screen
IF n6=2 THEN LOCATE Li,65:PRINT LEFT$(d$,1) 'prints only first word letter on screen
IF v<=18 THEN PUT (493,LL),ji 'drawing of yellow circle by city name
Li=Li+1:LL=LL+8:lim=lim+1:NEXT v:ERASE rt$
96 PUT (448,168),ji:LOCATE 22,59:PRINT "Restart Game"
CIRCLE (419,180),6:PAINT (419,180),3,2:LOCATE 23,55:PRINT "Restart Letter Selection":ERASE ji
IF n6=1 OR n6=2 THEN LOCATE 24,1:COLOR 1,0:PRINT "Select a ";zz$;:PRINT " related word by pressing left mouse on a orange circle";:COLOR 2
IF n6=3 THEN LOCATE 24,1:COLOR 1,0:PRINT "Press left mouse on orange circle by above word ";d$;:COLOR 2
GOSUB start
END
start: 'sub for city selection on yellow circle
100 WHILE MOUSE(0)=0:WEND
150 r=MOUSE(3):s=MOUSE(4)
175 IF r>413 AND r<=425 AND s>=174 AND s<=186 AND pop=2 THEN GOSUB reselect:pv=1:t1=0 'restarts letter selection of word in puzzle
180 IF r>449 AND r<=462 AND s>=165 AND s<=180 AND POINT (2,3)=2 THEN CLS:COLOR 1:GOTO 2 'restarts game
200 IF POINT(r,s)=3 AND t1=0 AND r<510 AND r>490 THEN col=65:row=INT(s/8)+1:GOSUB punk 'when t1=1, a city has been yellowed, prevents two cities from being selected.
450 IF t1=2 THEN LOCATE 24,1:GOSUB FIRSTLETTER
475 IF stat=1 THEN t1=0:pv=1:stat=0:GOTO 100
500 GOTO 100
600 RETURN
punk: 'yellowing of game title name, from sub start prior to finding it in the puzzle
110 COLOR 2,3:FOR tt=1 TO 20
131 IF tt=row AND n6=1 THEN LOCATE tt,col:PRINT d1$(tt):t1=1:a=0:GOTO 201
135 IF tt=row AND n6=2 THEN LOCATE tt,col:PRINT LEFT$(d1$(tt),1):t1=1:a=0:GOTO 201
140 IF tt=row AND n6=3 THEN a=0:t1=1:GOTO 201
155 NEXT tt
201 COLOR 2,0:PSET (2,3)
220 IF n6=2 THEN z9$=LEFT$(d1$(tt),1)+"__" ELSE z9$=d1$(tt) 'shows first word letter (n6=1) and two spaces or whole word (n6=1)
301 LOCATE 24,1:COLOR 1,0:PRINT "Select a letter of the word ";z9$;:PRINT " from the above letters ";
401 t1=2:COLOR 2
501 RETURN
FIRSTLETTER: 'sub for selecting first letter in puzzle
810 m=12:n=12:FOR d1=1 TO 11:FOR b1=1 TO 11:LZ=ASC(c$(d1,b1))
820 IF pv<LEN(d1$(tt)) OR pv=LEN(d1$(tt)) THEN lp=ASC(MID$(d1$(tt),pv,1)) ELSE GOTO 840
830 IF r>m-5 AND r<m+5 AND s>n-5 AND s<n+5 AND lp=LZ THEN GOSUB SECONDLETTER:RETURN
835 IF stat=1 THEN RETURN
840 m=m+40:NEXT b1
850 n=n+16:m=12:NEXT d1
860 RETURN
SECONDLETTER: 'sub for selecting second letter in puzzle
1000 IF pv=1 THEN COLOR 1,0:pop=2:LOCATE 2*d1,5*b1-3:PRINT c$(d1,b1):b2=b1:d2=d1:f(pv)=d1:g(pv)=b1:fi(pv)=((b1-1)*40)+12:gi(pv)=((d1-1)*16)+12:pv=pv+1:RETURN
1200 FOR lp=-1 TO 1:FOR rl=-1 TO 1 'loop for determining (d1,b1) position of new letter vs past selected letter. Maintains straight line in letter selection.
1300 IF pv=2 AND d2=d1+rl AND b2=b1+lp THEN COLOR 1,0:LOCATE 2*d1,5*b1-3:PRINT c$(d1,b1):COLOR 2:b2=b1:d2=d1:f(pv)=d1:g(pv)=b1:fi(pv)=((b1-1)*40)+12:gi(pv)=((d1-1)*16)+12:pv=pv+1:qq=rl:ww=lp:RETURN
1400 IF pv>=3 AND d2=d1+qq AND b2=b1+ww THEN GOSUB THIRDLETTER
1500 IF stat=1 THEN RETURN
1600 NEXT rl:NEXT lp
1700 RETURN
THIRDLETTER: 'sub for determining above third letters in puzzle
2000 IF pv<3 THEN RETURN
2100 IF pv>=3 AND d2=d1+qq AND b2=b1+ww THEN COLOR 1,0:LOCATE 2*d1,5*b1-3:PRINT c$(d1,b1):f(pv)=d1:g(pv)=b1:fi(pv)=((b1-1)*40)+12:gi(pv)=((d1-1)*16)+12:COLOR 2:b2=b1:d2=d1:pv=pv+1
2200 IF pv=LEN(d1$(tt))+1 THEN GOSUB final.letter
2250 IF pv=LEN(d1$(tt))+1 THEN COLOR 2:FOR po=1 TO kL:LOCATE 2*f(po),5*g(po)-3:PRINT c$(f(po),g(po)):NEXT po
2275 IF redo=0 THEN kik=1:FOR kik=1 TO 15000:NEXT kik:CLS:LOCATE 11,29:PRINT "You Win ! ! !":FOR jjj=1 TO 15000:NEXT jjj:CLS:COLOR 1:GOTO 2
2300 IF pv=LEN(d1$(tt))+1 AND (n6=1 OR n6=2) THEN LOCATE 24,1:COLOR 1:PRINT "Select another ";zz$;:PRINT " related word ";:COLOR 2:stat=1
2400 IF pv=LEN(d1$(tt))+1 AND n6=3 THEN lpo=1:FOR jjjj=1 TO 11000:NEXT jjjj:COLOR 1:GOTO 2
2900 RETURN
final.letter: 'sub for circling word in puzzle after solving
kL=LEN(d1$(tt))
IF pv=LEN(d1$(tt))+1 THEN redo=redo-1:COLOR 0,0:LOCATE row,col-3:PRINT " ":COLOR 2 'blanks out city and circle after puzzle letters are solved
IF fi(2)>fi(1) AND gi(2)<gi(1) THEN CIRCLE (fi(1),gi(1)),13,5,2.35,5.4978:CIRCLE (fi(kL),gi(kL)),13,5,5.4978,2.35:LINE (fi(1)-9,gi(1)-4)-(fi(kL)-9,gi(kL)-4),5:LINE (fi(1)+9,gi(1)+4)-(fi(kL)+9,gi(kL)+4),5
IF fi(2)>fi(1) AND gi(2)=gi(1) THEN CIRCLE (fi(1),gi(1)),13,5,1.5708,4.7124:CIRCLE (fi(kL),gi(kL)),13,5,4.7124,1.5708:LINE (fi(1),gi(1)-6)-(fi(kL),gi(kL)-6),5:LINE (fi(1),gi(1)+6)-(fi(kL),gi(kL)+6),5
IF fi(2)>fi(1) AND gi(2)>gi(1) THEN CIRCLE (fi(1),gi(1)),13,5,.7854,3.927:CIRCLE (fi(kL),gi(kL)),13,5,3.927,.7854:LINE (fi(1)+9,gi(1)-4)-(fi(kL)+9,gi(kL)-4),5:LINE (fi(1)-9,gi(1)+4)-(fi(kL)-9,gi(kL)+4),5
IF fi(2)=fi(1) AND gi(2)>gi(1) THEN CIRCLE (fi(1),gi(1)),13,5,0,3.1416:CIRCLE (fi(kL),gi(kL)),13,5,3.1416,0:LINE (fi(1)-13,gi(1))-(fi(kL)-13,gi(kL)),5:LINE (fi(1)+13,gi(1))-(fi(kL)+13,gi(kL)),5
IF fi(2)<fi(1) AND gi(2)>gi(1) THEN CIRCLE (fi(1),gi(1)),13,5,5.4978,2.3562:CIRCLE (fi(kL),gi(kL)),13,5,2.3562,5.4978:LINE (fi(1)-9,gi(1)-4)-(fi(kL)-9,gi(kL)-4),5:LINE (fi(1)+9,gi(1)+4)-(fi(kL)+9,gi(kL)+4),5
IF fi(2)<fi(1) AND gi(2)=gi(1) THEN CIRCLE (fi(1),gi(1)),13,5,4.7124,1.5708:CIRCLE (fi(kL),gi(kL)),13,5,1.5708,4.7124:LINE (fi(1),gi(1)-6)-(fi(kL),gi(kL)-6),5:LINE (fi(1),gi(1)+6)-(fi(kL),gi(kL)+6),5
IF fi(2)<fi(1) AND gi(2)<gi(1) THEN CIRCLE (fi(1),gi(1)),13,5,3.927,.7854:CIRCLE (fi(kL),gi(kL)),13,5,.7854,3.927:LINE (fi(1)-9,gi(1)+4)-(fi(kL)-9,gi(kL)+4),5:LINE (fi(1)+9,gi(1)-4)-(fi(kL)+9,gi(kL)-4),5
IF fi(2)=fi(1) AND gi(2)<gi(1) THEN CIRCLE (fi(1),gi(1)),13,5,3.1416,0:CIRCLE (fi(kL),gi(kL)),13,5,0,3.1416:LINE (fi(1)-13,gi(1))-(fi(kL)-13,gi(kL)),5:LINE (fi(1)+13,gi(1))-(fi(kL)+13,gi(kL)),5
pop=1
RETURN
Challenge: 'sub for n6=3, randon word and puzzle letter
IF n6=1 OR n6=2 THEN RETURN
FOR Lp1=1 TO n9:NEXT Lp1 'a dummy timer to vary direction of word
dir=INT((8-1+1)*RND)+1 'direction of word in puzzle
IF n6=3 THEN OPEN "Hard" FOR INPUT AS #2
n7=INT((n8-1+1)*RND)+1 'sets up rnd gen limits (1 to n8)
FOR tty=1 TO n8:INPUT #2,rt$(tty) 'input words to array from disk
IF n7=tty THEN d$=rt$(tty):CLOSE 2:GOTO 5000 'defines word to rnd number & exits loop
NEXT tty:CLOSE #2
5000 vx=INT((11-1+1)*RND)+1:amt=LEN(d$) 'rnd x coordinate
vy=INT((11-1+1)*RND)+1:ERASE rt$ 'rnd y coordinate
IF dir=3 OR dir=5 OR dir=7 AND (vx+amt)>11 THEN vx=11-amt
IF dir=1 OR dir=3 OR dir=8 AND (vy-amt)<1 THEN vy=1+amt
IF dir=4 OR dir=6 OR dir=8 AND (vx-amt)<1 THEN vx=1+amt
IF dir=2 OR dir=4 OR dir=7 AND (vy+amt)>11 THEN vy=11-amt
FOR d=1 TO 11
FOR b=1 TO 11
c$(d,b)=CHR$(INT((26-1+1)*RND)+1+64)
NEXT b:NEXT d 'loop determines initial puzzle letters randonally
FOR d3=1 TO 11:FOR b3=1 TO 11 'loop places word in puzzle
IF b3=vx AND d3=vy AND dir=1 THEN loo=1:FOR aa1=1 TO amt:c$(d3-aa1+1,b3)=MID$(d$,aa1,1):NEXT aa1
IF b3=vx AND d3=vy AND dir=2 THEN loo=1:FOR aa2=1 TO amt:c$(d3+aa2-1,b3)=MID$(d$,aa2,1):NEXT aa2
IF b3=vx AND d3=vy AND dir=3 THEN loo=1:FOR aa3=1 TO amt:c$(d3-aa3+1,b3+aa3-1)=MID$(d$,aa3,1):NEXT aa3
IF b3=vx AND d3=vy AND dir=4 THEN loo=1:FOR aa4=1 TO amt:c$(d3+aa4-1,b3-aa4+1)=MID$(d$,aa4,1):NEXT aa4
IF b3=vx AND d3=vy AND dir=5 THEN loo=1:FOR aa5=1 TO amt:c$(d3,b3+aa5-1)=MID$(d$,aa5,1):NEXT aa5
IF b3=vx AND d3=vy AND dir=6 THEN loo=1:FOR aa6=1 TO amt:c$(d3,b3-aa6+1)=MID$(d$,aa6,1):NEXT aa6
IF b3=vx AND d3=vy AND dir=7 THEN loo=1:FOR aa7=1 TO amt:c$(d3+aa7-1,b3+aa7-1)=MID$(d$,aa7,1):NEXT aa7
IF b3=vx AND d3=vy AND dir=8 THEN loo=1:FOR aa8=1 TO amt:c$(d3-aa8+1,b3-aa8+1)=MID$(d$,aa8,1):NEXT aa8
NEXT b3:NEXT d3:CLS
COLOR 4
LINE (0,4)-(420,18),4,bf:LINE (0,36)-(420,50),4,bf:LINE (0,69)-(420,83),4,bf
LINE (0,101)-(420,115),4,bf:LINE (0,132)-(420,146),4,bf:LINE (0,164)-(420,177),4,bf
FOR d=1 TO 11:c=2
IF d=1 OR d=3 OR d=5 OR d=7 OR d=9 OR d=11 THEN COLOR 2,4
FOR b=1 TO 11
LOCATE a,c:PRINT c$(d,b)
c=c+5:h=h+40
NEXT b:a=a+2:i=i+16:h=12
NEXT d:Li=2:LL=11:COLOR 2,0
FOR v=1 TO 2:d1$(v+1)=d$ 'makes d$ word nineteen times
IF v=1 THEN CIRCLE (500,11),6:PAINT (500,11),3,2:GET (493,7)-(507,15),ji 'draw circle by word
IF v=1 THEN LOCATE Li,65:PRINT d$ ELSE RETURN 'prints first word of array only
Li=Li+1:LL=LL+8:NEXT v
RETURN
reselect: 'sub for restarting letter selection
COLOR 2,0
IF n6=1 THEN LOCATE row,65:PRINT d1$(tt) 'prints whole word on screen
IF n6=2 THEN LOCATE row,65:PRINT LEFT$(d1$(tt),1) 'prints only first word letter on screen
FOR nn=1 TO pv
IF (5*g(nn)-3)=-3 THEN 6000 'I do not know why this line is reqd.
LOCATE 2*f(nn),5*g(nn)-3:PRINT c$(f(nn),g(nn))
NEXT nn
6000 IF n6=1 XOR n6=2 THEN LOCATE 24,1:COLOR 1,0:PRINT "Select a ";zz$;:PRINT " related word by pressing left mouse on a orange circle";:COLOR 2
IF n6=3 THEN LOCATE 24,1:COLOR 1,0:PRINT "Press left mouse on orange circle by above word ";d$;" ";:COLOR 2
RETURN
Screentitle: 'sub for fancy screen at game beginning